import React from 'react'
import PropTypes from 'prop-types'
import { View, Text, Image, Dimensions, StyleSheet } from 'react-native'
import { ScaleS, ScaleT } from 'src/utils/ScreenUtil'
import CustomImage from '../../../../../components/image/CustomImage'
import JobCell from 'src/components/job-cell/index'
import DefaultImage from 'src/components/image/DefaultImage'
import { getUserAvatorLocalB } from 'src/utils/ConfigUtil'

export default class CommunicationCell extends JobCell {
  renderBottom () {
    const { item } = this.props
    return (
      <View style={styles.bottomView}>
        <DefaultImage
          style={styles.img}
          source={{ uri: item.userAvator }}
          errorSource={getUserAvatorLocalB(item.gender)}/>
        <View style={styles.bossInfoView}>
          <Text style={styles.bossName}>{item.userName}</Text>
          <Text style={styles.bossPosition}>{item.postion}</Text>
        </View>
      </View>
    )
  }
}

const styles = StyleSheet.create({
  bottomView: {
    flexDirection: 'row',
    alignItems: 'center',
    marginTop: ScaleS(10)
  },
  img: {
    width: ScaleS(38),
    height: ScaleS(38),
    borderRadius: ScaleS(19),
    resizeMode: 'cover'
  },
  bossInfoView: {
    marginLeft: ScaleS(5)
  },
  bossName: {
    color: '#000000',
    fontSize: ScaleT(12),
    fontWeight: '400'
  },
  bossPosition: {
    color: '#000000',
    fontSize: ScaleT(10),
    fontWeight: '400',
    marginTop: ScaleS(5),
    opacity: 0.5
  }
})
